:root {
  font:
    15px/1.5 system-ui,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #231d3b;
  background: #f8f7fc;
  --accent: #5945ce;
  --muted: #645d79;
  --border: #e8e4f1;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #8e7be7;
  outline-offset: 2px;
}
.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.mast {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 750;
  font-size: 17px;
}
.brand img {
  width: 30px;
}
.new {
  font-size: 13px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 650;
}
main {
  padding-block: 30px 44px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(23px, 4vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 16px;
}
p {
  color: var(--muted);
}
.intro {
  text-align: center;
  margin: 6px auto 23px;
}
.intro img {
  width: 48px;
  margin-block: 0 7px;
}
.intro p {
  margin-top: 8px;
}
.create-form {
  max-width: 480px;
  margin: auto;
  padding: 22px;
  display: grid;
  gap: 14px;
}
.create-form h2 {
  margin-bottom: 2px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 3px 13px #231d3b06;
}
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 650;
}
input,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid #ded9eb;
  background: #fff;
  color: #231d3b;
  border-radius: 8px;
  padding: 9px 10px;
  font-weight: 400;
}
.primary {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 15px;
  white-space: nowrap;
}
.primary:hover:not(:disabled) {
  background: #4733b7;
}
.room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.room-head p {
  margin-top: 5px;
  font-size: 13px;
}
.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
  align-items: start;
}
.calendar {
  padding: 13px;
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tabs {
  display: flex;
  background: #f3effc;
  padding: 3px;
  border-radius: 9px;
}
.tabs button,
.navigation button {
  border: 0;
  background: transparent;
  color: #554c74;
  border-radius: 6px;
  padding: 7px 11px;
  font-weight: 650;
  font-size: 13px;
}
.tabs button[aria-pressed="true"] {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 5px #28115d16;
}
.navigation {
  display: flex;
  gap: 5px;
}
.navigation button {
  background: #f6f2fb;
  font-size: 20px;
  line-height: 1;
  width: 33px;
  height: 33px;
  padding: 0;
}
#calendar-help {
  font-size: 12px;
  margin-block: 10px;
  color: var(--muted);
}
.scroll {
  overflow: auto;
  padding: 2px;
  max-height: 68vh;
  overscroll-behavior-inline: contain;
}
#grid {
  display: grid;
  gap: 2px;
  min-width: max(350px, 100%);
  align-items: stretch;
  user-select: none;
}
.column {
  background: white;
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  justify-items: center;
  padding: 3px 1px 7px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}
.column small {
  color: var(--muted);
  font-weight: 500;
}
.tick {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  align-self: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.slot {
  border: 1px solid #ebe7f4;
  background: #f7f5fb;
  border-radius: 4px;
  height: 22px;
  min-width: 0;
  color: #30245d;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  padding: 0;
  line-height: 1;
}
.slot:hover,
.slot.detail {
  border-color: #6f57dc;
}
.slot[aria-pressed="true"] {
  background: #7058e0;
  color: #fff;
  border-color: #7058e0;
}
.slot.heat {
  background: color-mix(in srgb, #674ccb calc(var(--level) * 1%), #f7f5fb);
  color: var(--ink);
  border-color: #ded6f3;
}
.slot.heat.unanimous {
  background: #18705f;
  border-color: #18705f;
  color: #fff;
}
.slot.heat.unanimous:is(:hover, .detail) {
  outline: 2px solid #18705f;
  outline-offset: 1px;
}
aside {
  display: grid;
  gap: 12px;
}
.panel {
  padding: 14px;
  display: grid;
  gap: 10px;
}
.selection {
  display: flex;
  gap: 5px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.results h2 {
  display: flex;
  align-items: center;
  gap: 6px;
}
.results h2 span {
  color: var(--accent);
  font-size: 13px;
  background: #f0ebfc;
  padding: 0px 6px;
  border-radius: 6px;
}
#people {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
#people span {
  padding: 3px 7px;
  border-radius: 6px;
  background: #f3f0f9;
  overflow-wrap: anywhere;
}
#people p,
#slot-detail p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
#status {
  position: fixed;
  z-index: 5;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 9px 14px;
  border-radius: 9px;
  background: #30245d;
  color: #fff;
  box-shadow: 0 3px 16px #241b6033;
}
#status:empty {
  display: none;
}
@media (max-width: 700px) {
  main {
    padding-top: 18px;
  }
  .room-head {
    align-items: flex-start;
  }
  .room-head .primary {
    padding: 8px;
    font-size: 12px;
  }
  .room-layout {
    grid-template-columns: 1fr;
  }
  .room-layout aside {
    grid-template-columns: 1fr 1fr;
  }
  .calendar {
    padding: 10px;
  }
  .scroll {
    max-height: 55vh;
  }
  .slot {
    height: 28px;
  }
}
@media (max-width: 440px) {
  .room-layout aside {
    grid-template-columns: 1fr;
  }
  .shell {
    width: calc(100% - 22px);
  }
  .create-form {
    padding: 16px;
  }
  .intro p {
    font-size: 13px;
  }
}
