.gd-date {
  --date-ink: #162237;
  --date-muted: #505d70;
  --date-border: #d7e0e9;
  --date-action: #234d83;
  --date-tint: #edf4fc;
  color: var(--date-ink);
}
.gd-date *, .gd-date *::before, .gd-date *::after { box-sizing: border-box; }
.gd-date [hidden] { display: none !important; }
.gd-date :is(button, input, select, summary):focus-visible {
  outline: 3px solid var(--date-action);
  outline-offset: 2px;
}
.gd-date .gd-tools-directory-header { padding-block: clamp(15px, 2.4vw, 24px); }
.gd-date-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  font-weight: 700;
  color: var(--date-action);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gd-date-quick, .gd-date-game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.gd-date-card, .gd-date-game {
  padding: clamp(14px, 2.6vw, 24px);
  border: 1px solid var(--date-border);
  border-radius: 14px;
  background: #fff;
}
.gd-date h2 { font-size: clamp(18px, 2.5vw, 24px); line-height: 1.35; }
.gd-date h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.gd-date-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 12px 0;
}
.gd-date-offset-fields { grid-template-columns: minmax(0, 1.5fr) minmax(0, .75fr) minmax(0, 1fr); }
.gd-date-fields label { display: grid; align-content: start; gap: 4px; min-width: 0; font-weight: 700; font-size: 14px; }
.gd-date input:not([type=checkbox]), .gd-date select {
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 5px 7px;
  color: var(--date-ink);
  background: #fff;
  border: 1px solid #a8b7c9;
  border-radius: 7px;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
.gd-date input::-webkit-date-and-time-value { text-align: start; }
.gd-date-quick-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: center;
  gap: 1px 12px;
  min-height: 60px;
  padding: 8px 12px;
  background: var(--date-tint);
  color: var(--date-action);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.gd-date-quick-result strong { font-size: clamp(19px, 2.8vw, 26px); line-height: 1.35; }
.gd-date-game { margin-top: 18px; border-top: 4px solid var(--date-action); scroll-margin-top: 64px; }
.gd-date-game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 14px;
  margin-bottom: 14px;
}
.gd-date-game-header p { color: var(--date-muted); margin-top: 4px; }
.gd-date-game-grid {
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
  gap: clamp(12px, 3vw, 28px);
  align-items: start;
}
.gd-date-game-grid form { min-width: 0; }
.gd-date-game-grid form > .gd-date-fields:first-child { margin-top: 0; }
.gd-date :is(.gd-date-secondary, .gd-date-primary) {
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid var(--date-action);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.gd-date-secondary { background: #fff; color: var(--date-action); white-space: nowrap; }
.gd-date-secondary:hover { background: var(--date-tint); }
.gd-date-primary { width: 100%; background: var(--date-action); color: #fff; }
.gd-date-primary:hover { background: #17395f; }
.gd-date-week { min-width: 0; margin: 0; padding: 0; border: 0; }
.gd-date-week legend { font-size: 14px; font-weight: 700; padding: 0 0 5px; }
.gd-date-week > div { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.gd-date-week label { position: relative; cursor: pointer; }
.gd-date-week input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gd-date-week span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid #a8b7c9;
  border-radius: 7px;
  background: #fff;
  font-weight: 700;
}
.gd-date-week input:checked + span { background: var(--date-action); color: #fff; border-color: var(--date-action); }
.gd-date-week input:focus-visible + span { outline: 3px solid var(--date-action); outline-offset: 2px; }
.gd-date .gd-date-hint { color: var(--date-muted); font-size: 13px; line-height: 1.6; }
.gd-date-rewards { margin: 12px 0; background: #f7f9fc; border: 1px solid var(--date-border); border-radius: 8px; padding: 0 10px; }
.gd-date-rewards summary { min-height: 44px; padding: 9px 0; color: var(--date-action); font-weight: 700; cursor: pointer; }
.gd-date-rewards summary span { margin-left: 4px; color: var(--date-muted); font-size: 12px; font-weight: 400; }
.gd-date .gd-date-error { margin: 0 0 9px; color: #9b2525; font-weight: 700; }
.gd-date-plan { background: var(--date-tint); border: 1px solid var(--date-border); border-radius: 11px; padding: clamp(12px, 2.2vw, 18px); min-width: 0; }
.gd-date-plan h3 { margin-bottom: 6px; scroll-margin-top: 64px; }
.gd-date-plan h3:focus { outline: none; }
.gd-date .gd-date-plan-total {
  display: flex;
  flex-wrap: wrap;
  gap: 0 13px;
  align-items: baseline;
  margin-top: 8px;
  color: var(--date-action);
}
.gd-date-plan-total strong { font-size: clamp(23px, 3.7vw, 36px); line-height: 1.3; }
.gd-date .gd-date-plan-rounds { margin-top: 6px; color: var(--date-ink); font-weight: 700; overflow-wrap: anywhere; }
.gd-date-slot-list { display: grid; gap: 6px; list-style: none; margin: 10px 0 0; padding: 0; }
.gd-date-slot-list:empty { display: none; }
.gd-date-slot-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 6px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid var(--date-border);
  border-radius: 6px;
}
.gd-date-slot-list li span { grid-column: 1; font-size: 13px; color: var(--date-muted); }
.gd-date-slot-list li b { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 13px; color: var(--date-action); overflow-wrap: anywhere; max-width: 12ch; }
@media (max-width: 720px) {
  .gd-date-quick, .gd-date-game-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 530px) {
  .gd-date-game-header { flex-direction: column; }
}
@media (max-width: 355px) {
  .gd-date-offset-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gd-date-offset-fields label:first-child { grid-column: 1 / -1; }
}

.gd-date .gd-date-day-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 7px; }
.gd-date-day-shortcuts button {
  min-height: 35px;
  padding: 4px 9px;
  border: 1px solid #a8b7c9;
  border-radius: 6px;
  background: var(--date-tint);
  color: var(--date-action);
  font: inherit;
  cursor: pointer;
}
.gd-date-rewards > p { margin-top: 3px; }
