.type-box-detail-tabs:has(.type-box-ask-moon) { align-items: center; flex-wrap: wrap; }
.type-box-detail-tabs button.type-box-ask-moon {
  min-height: 38px;
  padding: 5px 13px;
  margin-inline-start: auto;
  border: 1px solid #62796a;
  border-radius: 5px;
  color: #fffaf0;
  background: #375449;
  font: 600 14px/1.35 "Noto Serif SC", "Songti SC", SimSun, serif;
  white-space: nowrap;
  cursor: pointer;
}
.type-box-detail-tabs button.type-box-ask-moon:hover { background: #29463d; }
.type-box-ask-status { font-size: 13px; color: #854d36; }
.chart-moon-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: min(780px, calc(100dvh - 30px));
  box-sizing: border-box;
  padding: clamp(16px, 4vw, 28px);
  overflow: auto;
  border: 1px solid #7b8274;
  border-radius: 16px;
  background: #fbf8ef;
  color: #263b36;
  box-shadow: 0 20px 66px #17221e70;
  font: 15px/1.65 system-ui, sans-serif;
}
.chart-moon-dialog::backdrop { background: #17251f71; }
.chart-moon-trace {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.chart-moon-trace rect {
  fill: none;
  stroke: #d1b87b;
  stroke-width: 1.2px;
  stroke-dasharray: 1;
  vector-effect: non-scaling-stroke;
}
.chart-moon-header, .chart-moon-pin, .chart-moon-room { position: relative; }
.chart-moon-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}
.chart-moon-header h2 {
  margin: 0;
  font: 600 24px/1.4 "Noto Serif SC", "Songti SC", SimSun, serif;
}
.chart-moon-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 31%, #fff5d5, #d6b677);
  box-shadow: 0 0 14px #dbbc7877;
}
.chart-moon-close {
  margin-inline-start: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #ebece2;
  color: inherit;
  font: 22px system-ui;
  cursor: pointer;
}
.chart-moon-pin {
  z-index: 1;
  padding: 10px 14px;
  border: 1px solid #d4c6a6;
  border-radius: 7px;
  background: #f1ebd8;
}
.chart-moon-pin p { margin: 0 0 7px; color: #60604b; font-size: 13px; }
.chart-moon-pin dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  text-align: center;
}
.chart-moon-pin dt { font-size: 12px; color: #5e6655; }
.chart-moon-pin dd { margin: 0; font: 600 clamp(19px, 5vw, 24px)/1.5 "Noto Serif SC", SimSun, serif; }
.chart-moon-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 140px;
  height: min(310px, 31dvh);
  margin: 14px 0 0;
  padding: 2px 3px 12px;
  overflow: auto;
  list-style: none;
}
.chart-moon-log li {
  align-self: start;
  max-width: 88%;
  padding: 8px 13px;
  border-radius: 4px 12px 12px 12px;
  background: #eee8d8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chart-moon-log li[data-role=user] {
  align-self: end;
  border-radius: 12px 4px 12px 12px;
  background: #e1ebe1;
}
.chart-moon-status { margin: 4px 0; color: #5d675a; font-size: 13px; }
.chart-moon-login { color: #375449; }
.chart-moon-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}
.chart-moon-form textarea {
  min-width: 0;
  max-height: 135px;
  box-sizing: border-box;
  padding: 8px 11px;
  resize: vertical;
  border: 1px solid #b7bfaa;
  border-radius: 6px;
  background: #fffdf5;
  color: inherit;
  font: inherit;
}
.chart-moon-form button {
  align-self: end;
  min-height: 40px;
  padding: 5px 14px;
  border: 0;
  border-radius: 6px;
  background: #375449;
  color: #fffaf0;
  font: inherit;
  cursor: pointer;
}
.chart-moon-form button:disabled { opacity: .56; cursor: default; }
