#mission-log { margin-inline: auto; }
#mission-log [hidden], #mission-dialog [hidden] { display: none; }
.ml-heading { margin-bottom: 15px; }
.ml-heading p { margin: 0; color: var(--desk-muted); font-size: 16px; line-height: 1.7; }
.ml-ledger { list-style: none; padding: 0; margin: 0; }
.ml-entry {
  border-top: 1px solid var(--desk-line);
  display: grid; grid-template-columns: minmax(108px, .7fr) minmax(0, 3fr) auto;
  gap: clamp(15px, 3vw, 52px); align-items: baseline;
  padding: 23px 0;
}
.ml-entry:last-child { border-bottom: 1px solid var(--desk-line); }
.ml-frequency { display: flex; gap: 5px; align-items: center; font: 15px var(--mono); color: #c6c0b2; }
.ml-frequency small { font-size: 12px; }
.ml-frequency i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid #8f8b80; margin-right: 4px; }
.ml-entry:not([data-status='locked']) .ml-frequency i { background: #dab476; border-color: #dab476; }
.ml-description h3 { margin: 0; color: #eee8da; font: 500 clamp(22px, 2.5vw, 36px)/1.35 var(--desk-serif); letter-spacing: -.04em; }
.ml-state { margin: 6px 0 0; color: #c2bcad; font-size: 14px; }
.ml-excerpt { max-width: 40em; margin: 12px 0 0; color: #d8d3c7; font-size: 16px; line-height: 1.85; }
.ml-action { min-height: 44px; padding: 7px 0; background: none; border: none; border-bottom: 1px solid #b1a48b; color: #e2d5bb; }
.ml-session { color: #d6b98a; line-height: 1.6; }
#mission-dialog {
  --paper: #e8e3d5; --type: #28261e;
  width: min(650px, calc(100% - 28px)); max-height: 89svh;
  overflow: auto; padding: 0;
  border: none; border-radius: 1px; color-scheme: light;
  background: var(--paper); color: var(--type);
  box-shadow: 0 22px 90px #000a;
}
#mission-dialog::backdrop { background: #070807d6; backdrop-filter: blur(5px); }
.ml-reader {
  position: relative; padding: clamp(29px, 5vw, 58px) clamp(24px, 6vw, 70px);
  background: repeating-linear-gradient(0deg, #3c372202 0 1px, transparent 1px 4px);
}
.ml-close {
  position: absolute; right: 8px; top: 8px; width: 44px; height: 44px;
  border: 0; background: none; color: var(--type); font-size: 27px;
}
.ml-source { padding-bottom: 13px; border-bottom: 1px solid #5d554766; color: #655e4e; font: 14px/1.65 var(--mono); margin: 0 15px 24px 0; }
#ml-story-title { margin: 0 0 22px; font: 600 clamp(30px, 4vw, 49px)/1.2 var(--display, 'Songti SC'),'STSong','SimSun',serif; letter-spacing: -.06em; }
.ml-message { white-space: pre-line; font-size: 17px; line-height: 1.95; color: #353128; }
.ml-response { border-top: 1px dashed #817864a3; padding-top: 20px; margin-top: 27px; }
.ml-response h3 { font-size: 16px; margin: 0 0 14px; }
.ml-choice-list { display: grid; gap: 9px; }
.ml-choice-list button { display: flex; align-items: center; gap: 10px; min-height: 44px; background: transparent; color: var(--type); text-align: left; padding: 9px 12px; border: 1px solid #99917f; border-radius: 0; }
.ml-choice-list button::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #686151; flex: none; }
.ml-choice-list button:hover { background: #dcd5c4; }
.ml-outgoing { margin: 0; line-height: 1.6; color: #69604e; }
.ml-received blockquote { margin: 16px 0 22px; padding-left: 14px; border-left: 2px solid #946f35; font: 500 18px/1.85 'Songti SC','STSong','SimSun',serif; }
.ml-controls { display: flex; gap: 20px; flex-wrap: wrap; }
.ml-controls button { min-height: 44px; background: none; color: #3c362b; border: 0; border-bottom: 1px solid #827662; padding: 6px 0; font-size: 15px; }
#mission-dialog button:focus-visible { outline: 2px solid #905d27; outline-offset: 3px; }
@media(max-width: 630px) {
  .ml-entry { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 9px; padding-block: 16px; }
  .ml-frequency { grid-area: 1 / 1; }
  .ml-description { grid-area: 2 / 1 / auto / -1; }
  .ml-action { grid-area: 1 / 2; }
}
