:root {
  color-scheme: light;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.5;
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #53606f;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

.panel {
  background: #fff;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.service-row,
.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

button,
input,
textarea,
.button {
  font: inherit;
}

button,
.button {
  border: 1px solid #c8d0da;
  border-radius: 6px;
  background: #fff;
  color: #17202a;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button.is-active,
button[type="submit"],
.button {
  background: #164b8f;
  color: #fff;
  border-color: #164b8f;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #80b7ff;
  outline-offset: 2px;
}

.slot-table {
  display: grid;
  gap: 10px;
}

.slot-day {
  display: grid;
  grid-template-columns: minmax(132px, 190px) 1fr;
  align-items: start;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.slot-day h3 {
  display: grid;
  gap: 4px;
  min-height: 100%;
  margin: 0;
  padding: 12px 14px;
  background: #f1f4f7;
  border-right: 1px solid #dbe1e8;
  line-height: 1.4;
}

.date-main {
  font-size: 14px;
  font-weight: 800;
  word-break: keep-all;
}

.date-offset {
  width: fit-content;
  border-radius: 999px;
  background: #e5edf6;
  color: #164b8f;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.slot-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.slot {
  min-width: 96px;
}

.slot.is-selected {
  background: #0f7a5f;
  color: #fff;
  border-color: #0f7a5f;
}

.slot-message,
.selected-summary {
  border: 1px solid #dbe1e8;
  border-radius: 8px;
  padding: 14px;
  background: #f7f9fb;
  color: #3c4653;
}

.slot-message.error {
  border-color: #e0a5a5;
  background: #fff1f1;
  color: #7a1f1f;
}

.slot-message.empty {
  background: #fff;
}

.selected-summary {
  margin-top: 12px;
  border-color: #a9d6c8;
  background: #edf8f4;
  color: #174c3d;
  font-weight: 700;
}

form {
  display: grid;
  gap: 10px;
}

input,
textarea {
  min-height: 44px;
  border: 1px solid #c8d0da;
  border-radius: 6px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: #53606f;
  font-size: 13px;
  font-weight: 700;
}

.helper {
  margin-bottom: 12px;
  color: #53606f;
  font-size: 14px;
}

.notice {
  border: 1px solid #d9c58a;
  background: #fff8df;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
  color: #4d3f14;
  white-space: pre-line;
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.map-links a {
  border: 1px solid #d9c58a;
  border-radius: 6px;
  background: #fff;
  color: #3f3511;
  min-height: 36px;
  padding: 7px 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f1df9e;
  color: #3f3511;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}

.status {
  margin: 12px 0 0;
  color: #53606f;
}

.status.success {
  color: #0f6b53;
}

.status.error {
  color: #9a2d2d;
}

.status.loading {
  color: #164b8f;
}

.completion-notice {
  margin-top: 14px;
  border: 1px solid #a9d6c8;
  border-radius: 8px;
  background: #edf8f4;
  color: #174c3d;
  padding: 14px;
}

.completion-notice[hidden] {
  display: none;
}

.completion-notice h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.completion-body {
  white-space: pre-line;
  line-height: 1.55;
}

.calendar-actions,
.email-draft {
  margin-top: 16px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.calendar-actions[hidden] {
  display: none;
}

.calendar-actions h3 {
  width: 100%;
  margin: 0;
  font-size: 16px;
}

.email-draft h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.draft-subject {
  margin-bottom: 10px;
  font-weight: 700;
}

.email-draft pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 12px;
  font-family: inherit;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

code {
  background: #edf1f5;
  border-radius: 4px;
  padding: 2px 5px;
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 960px);
    padding: 18px 0;
  }

  h1 {
    font-size: 26px;
  }

  .panel {
    padding: 14px;
  }

  .slot-day {
    grid-template-columns: 1fr;
  }

  .slot-day h3 {
    border-right: 0;
    border-bottom: 1px solid #dbe1e8;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .date-main {
    font-size: 14px;
  }

  .slot-times {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  .slot {
    min-width: 0;
    width: 100%;
    padding: 0 8px;
  }
}

@media (max-width: 380px) {
  .slot-day h3 {
    grid-template-columns: 1fr;
  }

  .slot-times {
    grid-template-columns: 1fr;
  }
}
