:root {
  --ink-0: #f4f8ff;
  --ink-1: #c8d2e6;
  --ink-2: #8f9db8;
  --panel: #101723;
  --panel-2: #0c121c;
  --line: #263247;
  --line-soft: #1c2638;
  --accent: #2a9dff;
  --available: #225f95;
  --reserved: #1f4fd6;
  --blocked: #3f4858;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans JP", sans-serif;
  background: radial-gradient(circle at 15% -10%, #19334d 0%, #0a1018 45%, #05080d 100%);
  color: var(--ink-0);
  min-height: 100vh;
}

.zds-page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.zds-topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.zds-eyebrow {
  margin: 0;
  color: var(--ink-2);
  letter-spacing: 0.08em;
  font-size: 12px;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(24px, 3vw, 36px);
}

.zds-controls-wrap {
  display: flex;
  align-items: end;
  gap: 10px;
  width: 100%;
}

.zds-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zds-language-controls {
  max-width: 300px;
}

.zds-language-note {
  margin: 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.4;
  max-width: 300px;
}

.zds-cancel-controls {
  margin-left: auto;
}

label {
  color: var(--ink-1);
  font-size: 13px;
}

select {
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink-0);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

input {
  min-width: 240px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink-0);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 157, 255, 0.2);
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 157, 255, 0.2);
}

.zds-cancel-box {
  display: flex;
  gap: 8px;
}

.zds-cancel-box button,
.zds-week-nav button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #17263b;
  color: var(--ink-0);
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}

.zds-cancel-box button:hover,
.zds-week-nav button:hover {
  border-color: var(--accent);
}

.zds-calendar-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(22, 31, 46, 0.95), rgba(10, 16, 27, 0.95));
  overflow: hidden;
}

.zds-required-state {
  min-height: 420px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--ink-1);
  padding: 20px;
}

.zds-required-state h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
}

.zds-required-state p {
  margin: 10px 0 0;
}

.zds-calendar-shell.zds-is-hidden {
  display: none;
}

.zds-week-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 12, 20, 0.8);
}

#zds-week-label {
  margin: 0;
  color: var(--ink-1);
  font-size: 14px;
}

.zds-calendar-header {
  display: grid;
  grid-template-columns: 72px 1fr;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 12, 20, 0.8);
}

.zds-time-col-label {
  padding: 12px 10px;
  color: var(--ink-2);
  font-size: 12px;
  border-right: 1px solid var(--line);
}

.zds-day-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.zds-day-header-cell {
  padding: 12px 10px;
  border-right: 1px solid var(--line);
}

.zds-day-header-cell:last-child {
  border-right: none;
}

.zds-day-name {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
}

.zds-day-date {
  color: var(--ink-2);
  font-size: 13px;
}

.zds-calendar-grid {
  position: relative;
  min-height: 540px;
  background: var(--panel-2);
}

.zds-time-row {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--line-soft);
}

.zds-time-label {
  position: absolute;
  left: 0;
  width: 72px;
  transform: translateY(-50%);
  color: var(--ink-2);
  font-size: 12px;
  text-align: center;
}

.zds-day-column {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line);
}

.zds-slot {
  position: absolute;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px;
  font-size: 12px;
  overflow: hidden;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.zds-slot strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.zds-slot.zds-available {
  background: linear-gradient(180deg, rgba(34, 95, 149, 0.18), rgba(18, 58, 96, 0.14));
  border: 1px dashed rgba(131, 191, 255, 0.7);
  overflow: visible;
}

.zds-slot.zds-reserved {
  background: linear-gradient(180deg, rgba(31, 79, 214, 0.85), rgba(15, 51, 150, 0.85));
}

.zds-slot.zds-blocked {
  background: linear-gradient(180deg, rgba(63, 72, 88, 0.75), rgba(44, 52, 66, 0.75));
}

.zds-slot:hover {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(42, 157, 255, 0.65), 0 10px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
  z-index: 5;
}

.zds-now-line {
  position: absolute;
  left: 72px;
  right: 0;
  border-top: 2px solid #e8edf8;
  opacity: 0.9;
}

.zds-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 13, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.zds-modal-overlay.zds-is-hidden {
  display: none;
}

.zds-modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.zds-modal h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
}

.zds-book-slot-label {
  color: var(--accent);
  margin: 0 0 24px;
  font-size: 14px;
}

.zds-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.zds-required-mark {
  color: #ff6b6b;
  font-weight: 700;
}

.zds-form-group input {
  min-width: 0;
  width: 100%;
}

.zds-book-error {
  color: #ff6b6b;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 4px;
}

.zds-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.zds-turnstile {
  margin-right: 8px;
}

.zds-modal-actions button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #17263b;
  color: var(--ink-0);
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
}

.zds-modal-actions button[type="submit"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.zds-modal-actions button:hover {
  border-color: #fff;
}

@media (max-width: 900px) {
  .zds-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .zds-controls-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .zds-cancel-controls {
    margin-left: 0;
  }

  select {
    min-width: 220px;
  }

  input {
    min-width: 180px;
  }

  .zds-cancel-box {
    flex-direction: column;
  }

  .zds-language-controls,
  .zds-language-note {
    max-width: 100%;
  }

  .zds-calendar-header {
    grid-template-columns: 52px 1fr;
  }

  .zds-time-label {
    width: 52px;
    font-size: 11px;
  }

  .zds-now-line {
    left: 52px;
  }

  .zds-modal-actions {
    justify-content: flex-start;
  }

  .zds-turnstile {
    margin-right: 0;
    order: 3;
  }
}
