/* Keep the view of the path open around the current conversation. */
body[data-view="chat"] #scenery::after {
  background: linear-gradient(180deg, #0d1c1573, transparent 25%, transparent 85%, #1225193b);
}
body[data-view="chat"] .voice-walk {
  width: min(100%, 43rem);
  isolation: isolate;
}
.walk-scroll {
  padding: clamp(.45rem, 3vh, 1.5rem) .55rem max(.4rem, env(safe-area-inset-bottom));
  overflow-x: hidden;
  scrollbar-width: thin;
}
.walk-caption, .walk-scroll > .voice-deck {
  position: relative;
  isolation: isolate;
}
.walk-caption::before, .walk-scroll > .voice-deck::before {
  content: "";
  position: absolute;
  inset: -.45rem 0;
  z-index: -1;
  pointer-events: none;
  border-radius: 30%;
  background: radial-gradient(ellipse at center, #13271be8 5%, #15291cc9 51%, #162c1e66 72%, transparent 93%);
  filter: blur(11px);
}
.walk-caption #walk-prompt {
  margin-block: .15rem .3rem;
  max-height: none;
  overflow: visible;
  line-height: 1.52;
  font-size: clamp(1.4rem, 3.7vw, 2rem);
  text-shadow: 0 1px 3px #051208, 0 1px 12px #102416;
}
#walk-answers {
  margin-top: .3rem;
}
.answer-examples {
  gap: .28rem .4rem;
}
.answer-examples span, .answer-hint, .voice-text label, #change-question, .walk-footer .btn,
.voice-deck .notebook-shortcut {
  text-shadow: 0 1px 3px #091a10, 0 1px 8px #152c1b;
}
.answer-examples .btn {
  background-color: #213e2fdc;
  border-color: #d4e1c68a;
  font-size: 1rem;
}
.answer-hint {
  font: .94rem/1.5 var(--sans);
}
#change-question {
  font-size: .94rem;
  margin: 0;
  background: transparent;
  border: 0;
}
.voice-deck .walk-input-bar {
  border: 0;
  padding: .4rem 0 .15rem;
}
.walk-input-bar > .actions, .walk-input-bar .actions {
  margin: 0;
}
.voice-text label {
  margin-bottom: .2rem;
}
body[data-view="watch"] .walk-prompt {
  justify-content: flex-end;
}
.walk-prompt > div:first-child {
  flex: 0 1 auto;
  padding: .75rem .25rem;
}
.walk-prompt > .actions {
  margin: .25rem 0 max(1rem, 6vh);
  justify-content: flex-start;
}
@media (max-height: 520px) {
  .walk-scroll .walk-caption {
    margin-top: 0;
  }
  .walk-prompt > .actions {
    margin-bottom: .35rem;
  }
}
.kotonoha-dialog:has([data-action="pick-question"], [data-action="field-direction"]) {
  background: #1e372cf7;
  color: #f6f6ea;
  border: 1px solid #c8d9c25c;
}
.kotonoha-dialog:has([data-action="pick-question"], [data-action="field-direction"]) .actions {
  display: grid;
}
.kotonoha-dialog :is([data-action="pick-question"], [data-action="field-direction"]) {
  text-align: start;
  background: #294637;
  color: #fffaf0;
  border-color: #a6b8a1;
  min-height: 44px;
}
.kotonoha-dialog :is([data-action="pick-question"], [data-action="field-direction"])[aria-pressed="true"] {
  background: #e6efde;
  color: #1a3428;
}
.kotonoha-dialog:has([data-action="pick-question"], [data-action="field-direction"]) .ghost {
  color: #fffaf0;
}

.walk-history{max-height:55vh;max-height:55dvh;overflow:auto;overscroll-behavior:contain}
#walk-recent:empty{display:none}
#walk-recent:not(:empty){
  margin:.2rem 0 .45rem;padding:.3rem .65rem;
  border-inline-start:2px solid #d0ddc1;background:#142d22cc;border-radius:.2rem;
  max-height:7rem;overflow:auto;color:#fffaf0;font:1rem/1.45 var(--sans);overflow-wrap:anywhere;
}
#walk-recent p{margin:.15rem 0;white-space:pre-wrap}
#walk-recent b{font-size:.9rem;margin-inline-end:.5rem}
.walk-caption [data-action="walk-history"] {
  min-height:44px;padding:.3rem .55rem;color:#faf9ec;background:#1b3429b8;
  border:none;font-size:.92rem;text-decoration:underline;text-underline-offset:.2em;
}

@media screen and (min-width: 48rem) {
  /* The caption's shade extends past its content. Keep that edge inside the
     scroll area even when the controls sit flush with the bottom. */
  body[data-view="chat"] .walk-scroll {
    padding-block: .6rem max(.65rem, env(safe-area-inset-bottom));
  }
  body:is([data-view="watch"], [data-view="chat"]) #scenery video,
  .walk-scroll .voice-text textarea {
    display: block;
  }
  .walk-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 .65rem;
  }
  .walk-caption > * {
    flex: 0 0 100%;
    min-width: 0;
  }
  .walk-caption > [data-action="walk-history"],
  .walk-caption > #change-question {
    flex: 0 0 auto;
  }
  .walk-caption > #walk-source:empty { display: none; }
  .walk-caption > #walk-source:not(:empty) {
    flex: 1 1 12rem;
    margin: 0 0 .25rem;
  }
  .walk-caption #walk-source .turn.mine {
    width: fit-content;
    margin-inline-start: auto;
  }
  .walk-caption > #walk-answers:not([hidden]) {
    flex: 1 1 18rem;
  }
  .voice-deck > .notebook-shortcut + .walk-footer {
    display: inline-flex;
    vertical-align: baseline;
    margin-inline-start: .6rem;
  }
}
@media screen and (min-width: 48rem) and (max-height: 42rem) {
  .walk-caption .answer-examples span {
    flex-basis: auto;
  }
}
