:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Noto Sans JP",
    sans-serif;
  color: #1c2229;
  background: #f7f9fa;
  font-size: 16px;
  --line: #d9dee5;
  --accent: #4f6f82;
  --selected: #edf3f6;
  --muted: #65717e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  min-height: 46px;
  padding: 10px 16px;
  touch-action: manipulation;
}
button:hover {
  border-color: var(--accent);
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #86a4b6;
  outline-offset: 3px;
}
button.primary,
button[aria-pressed="true"] {
  background: var(--selected);
  border-color: var(--accent);
  color: #365b70;
}
button.danger {
  background: #f1f3f5;
  border-color: #8996a3;
}
h1,
h2,
h3,
p {
  margin: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 32px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mark {
  color: var(--accent);
  border: 1.5px solid #93a8b5;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.17em;
  color: var(--muted);
  font-weight: 600;
}
h1 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: 0.03em;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.connection {
  font-size: 14px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 7px;
}
.connection:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7f9caa;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  gap: 12px;
}
.tabs {
  display: flex;
  gap: 6px;
}
.tabs button {
  min-width: 112px;
}
.toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.toolbar input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: white;
  color: inherit;
  min-height: 46px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(440px, 1.18fr);
  gap: 24px;
  padding: 0 32px 28px;
  max-width: 1600px;
  margin: auto;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.panel-top {
  padding: 24px 24px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f3;
}
.panel-top h2 {
  font-size: 22px;
}
.subtle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.calendar-scroll {
  max-height: calc(100dvh - 280px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 18px 22px;
  scrollbar-width: thin;
}
.month {
  padding-top: 22px;
  scroll-margin-top: 12px;
}
.month h3 {
  font-size: 17px;
  margin: 0 6px 16px;
  display: flex;
  justify-content: space-between;
}
.month h3 span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.week,
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.week {
  margin-bottom: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.day-cell {
  border-color: transparent;
  min-height: 64px;
  border-radius: 10px;
  padding: 7px 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.day-cell b {
  font-size: 17px;
  font-weight: 500;
}
.day-cell small {
  font-size: 12px;
  color: var(--accent);
}
.day-cell.full {
  background: #f1f3f5;
}
.day-cell.full small {
  color: var(--muted);
}
.day-cell.today b {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.day-cell.selected {
  background: var(--selected);
  border: 1.5px solid var(--accent);
}
.day-cell.past {
  color: #89929c;
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid #a6bac6;
  border-radius: 3px;
  margin-right: 5px;
}
.legend i.filled {
  background: #dce1e6;
  border-color: #c1cad2;
}
.date-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.date-title strong {
  font-size: 38px;
  font-weight: 550;
  letter-spacing: -0.035em;
}
.date-title span {
  color: var(--accent);
  font-size: 15px;
}
.capacity {
  text-align: right;
  white-space: nowrap;
  color: var(--accent);
}
.capacity b {
  font-size: 34px;
  font-weight: 500;
}
.capacity small {
  font-size: 14px;
}
.date-strip {
  display: flex;
  overflow: auto;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid #edf0f3;
  scrollbar-width: thin;
}
.date-strip button {
  flex: 0 0 70px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  align-items: center;
  padding: 9px 5px;
}
.date-strip b {
  font-size: 18px;
}
.slots {
  padding: 20px 24px;
  display: grid;
  gap: 12px;
}
.slot {
  width: 100%;
  min-height: 100px;
  display: flex;
  text-align: left;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  border-radius: 14px;
}
.slot.available {
  border: 1px dashed #a7bac7;
  background: #fcfdfe;
}
.slot.booked {
  background: #f1f3f5;
  border-color: #e4e8ed;
}
.slot-number {
  font-size: 25px;
  color: #8297a5;
  font-weight: 400;
  min-width: 34px;
}
.slot-content {
  flex: 1;
  min-width: 0;
}
.slot-content strong {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 550;
  margin-bottom: 5px;
}
.slot-symbol {
  font-size: 30px;
  line-height: 1.2;
  flex-shrink: 0;
}
.slot-label {
  font-size: 16px;
}
.slot-content p {
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.slot-action {
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
}
.slot-action .plus {
  font-size: 22px;
  margin-right: 4px;
}
.panel-foot {
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.banner {
  margin: 0 32px 16px;
  border: 1px solid #bccbd5;
  background: var(--selected);
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.banner:empty {
  display: none;
}
.gate {
  max-width: 470px;
  margin: 9vh auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
}
.gate h1 {
  margin: 8px 0 14px;
}
.gate p {
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 20px;
}
.gate label,
dialog label {
  display: block;
  font-size: 14px;
  margin: 18px 0 8px;
}
.gate input,
dialog select,
dialog textarea {
  display: block;
  width: 100%;
  padding: 13px;
  border: 1px solid #bcc7cf;
  border-radius: 10px;
  background: white;
  color: inherit;
  min-height: 48px;
}
textarea {
  resize: vertical;
  min-height: 116px;
}
form .primary {
  width: 100%;
  margin-top: 22px;
}
.gate .preview {
  margin-top: 14px;
  width: 100%;
}
.error {
  color: #85505a;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.gate .error {
  margin-top: 12px;
}
.loading {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  max-width: 510px;
  width: calc(100% - 32px);
  color: inherit;
  box-shadow: 0 24px 80px #334c6226;
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #23374755;
  backdrop-filter: blur(3px);
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.modal-top h2 {
  font-size: 22px;
}
.close {
  font-size: 24px;
  width: 44px;
  padding: 0;
  border: 0;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.modal-actions button {
  flex: 1;
}
.modal-meta {
  margin: 20px 0;
  background: #f1f3f5;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.9;
}
.comment-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 16px;
  line-height: 1.7;
}
.confirm-text {
  line-height: 1.8;
  margin: 20px 0;
}
.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #edf3f6;
  border: 1px solid #90a7b6;
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 6px 30px #32485b20;
  z-index: 20;
  max-width: 90%;
  font-size: 15px;
}
.more {
  width: 100%;
  margin-top: 20px;
}
.demo-badge {
  color: var(--accent);
}
.logout {
  font-size: 14px;
}
.date-picker-label {
  font-size: 14px;
  color: var(--muted);
}
@media (orientation: landscape) and (min-width: 900px) {
  .tabs {
    visibility: hidden;
  }
  .workspace {
    height: calc(100dvh - 173px);
    min-height: 550px;
  }
  .day-panel {
    overflow: auto;
  }
  .calendar-scroll {
    max-height: calc(100dvh - 284px);
  }
}
@media (orientation: portrait), (max-width: 899px) {
  header {
    padding: 20px 22px;
  }
  .toolbar {
    padding: 16px 22px;
  }
  .workspace {
    display: block;
    padding: 0 22px 24px;
  }
  .workspace[data-view="day"] .month-panel {
    display: none;
  }
  .workspace[data-view="month"] .day-panel {
    display: none;
  }
  .calendar-scroll {
    max-height: calc(100dvh - 270px);
  }
  .banner {
    margin: 0 22px 16px;
  }
  .slot {
    min-height: 110px;
  }
  .date-title strong {
    font-size: 40px;
  }
  .panel-top {
    padding: 24px;
  }
  .head-actions {
    gap: 8px;
  }
}
@media (max-width: 540px) {
  header {
    padding: 16px;
  }
  .brand {
    gap: 8px;
  }
  .mark {
    display: none;
  }
  h1 {
    font-size: 21px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .connection {
    font-size: 12px;
  }
  .logout {
    padding: 8px;
    font-size: 12px;
  }
  .toolbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .toolbar-right {
    gap: 6px;
  }
  .toolbar input {
    max-width: 148px;
    font-size: 14px;
  }
  .date-picker-label {
    display: none;
  }
  .tabs button {
    min-width: 83px;
    padding: 10px;
  }
  .workspace {
    padding: 0 12px 18px;
  }
  .panel-top {
    padding: 18px;
  }
  .slots {
    padding: 16px 14px;
  }
  .slot {
    padding: 14px 12px;
    gap: 10px;
  }
  .slot-action {
    font-size: 12px;
  }
  .slot-number {
    font-size: 22px;
  }
  .date-title strong {
    font-size: 33px;
  }
  .banner {
    margin: 0 12px 12px;
  }
  .gate {
    margin: 30px 16px;
    padding: 26px;
  }
  .panel-foot {
    flex-direction: column;
  }
  .week {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (orientation: landscape) and (min-width: 900px) {
  #app:has(.workspace) {
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  header {
    padding: 15px 28px;
    flex-shrink: 0;
  }
  .toolbar {
    padding: 12px 28px;
    flex-shrink: 0;
  }
  .workspace {
    height: auto;
    min-height: 0;
    flex: 1;
    width: 100%;
    padding: 0 28px 20px;
    gap: 20px;
  }
  .month-panel {
    display: flex;
    flex-direction: column;
  }
  .calendar-scroll {
    max-height: none;
    min-height: 0;
    flex: 1;
  }
  .day-panel {
    min-height: 0;
  }
  .panel-top {
    padding: 18px 22px 14px;
  }
  .date-title strong {
    font-size: 34px;
  }
  .date-strip {
    padding: 10px 20px;
  }
  .slots {
    padding: 14px 20px;
    gap: 8px;
  }
  .slot {
    min-height: 72px;
    padding: 10px 14px;
  }
  .slot-content strong {
    margin-bottom: 3px;
  }
  .panel-foot {
    padding: 0 20px 14px;
  }
  .banner {
    margin: 0 28px 12px;
    padding: 10px 16px;
    flex-shrink: 0;
  }
}
