.guided-banner {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  width: 100%;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 11px 15px;
  border: 1px solid #d9e4d7;
  border-radius: 15px;
  background: linear-gradient(100deg,#f3f6ec 50%,#e9f1e5);
  color: #234b3a;
  text-align: left;
  transition: background .2s ease, border-color .2s ease;
}
.guided-banner:hover { background: #e6f0e3; border-color: #a7c2a7; }
.guided-mark {
  display: flex; gap: 3px; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid #cadbc7; border-radius: 12px;
  background: #dfeadd; color: #326752;
}
.guided-mark i { display: block; width: 5px; height: 12px; border-radius: 3px; background: currentColor; }
.guided-mark i:nth-child(2) { height: 18px; }
.guided-mark i:nth-child(3) { height: 24px; }
.guided-banner-copy { display: grid; gap: 2px; }
.guided-banner-copy strong { font-size: 1.08rem; }
.guided-banner-copy small { color: #476458; font-size: .78rem; }
.guided-banner-go { font-size: .84rem; font-weight: 750; white-space: nowrap; }
.guided-banner-go span { font-size: 1.22em; margin-left: 3px; }
.companion-setting { display: flex; justify-content: flex-end; margin: 6px 0 9px; }
.companion-setting-button, .guided-change { min-height: 36px; padding: 4px 10px; font-size: .78rem; white-space: nowrap; }
.companion-balance { display: flex; justify-content: flex-end; align-items: center; gap: 5px; flex-wrap: wrap; }

.companion-dialog {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100dvh - 28px);
  padding: clamp(15px,4vw,22px);
  overflow: auto;
  margin: auto;
  border: 1px solid #d8e4d5;
  border-radius: 24px;
  background: #fffdf6;
  color: var(--ink);
  box-shadow: 0 24px 80px #142d3980;
}
.companion-dialog::backdrop { background: #1b352c80; }
.companion-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.companion-dialog-head h2 { font-size: 1.35rem; }
.companion-dialog > p { margin: 7px 0 16px; font-size: .88rem; color: var(--muted); }
.companion-close {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #dfe8de; background: #f1f6ed; color: #2e5342; font-size: 1.32rem;
}
.companion-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.companion-option {
  display: grid; align-content: start; gap: 4px; text-align: left; padding: 8px;
  border: 1px solid #e1e8d9; border-radius: 14px;
  background: #fffef9; color: #23473a;
}
.companion-option[aria-pressed="true"] { border-color: #547e66; box-shadow: inset 0 0 0 1px #547e66; background: #f0f7eb; }
.companion-option:hover { border-color: #769984; }
.companion-option small { color: #4c6458; font-size: .74rem; padding: 0 3px 3px; }
.companion-option strong { font-size: .9rem; padding-inline: 3px; }
.companion-portrait {
  height: clamp(84px,26vw,127px); display: flex; justify-content: center; align-items: flex-end;
  padding: 5px 9px; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 80%, #e6e8c3, #f6efdb 72%);
}
.companion-portrait img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px #52472b30); }
[data-companion="rabbit"] { --companion-tone: #e6efe0; }
[data-companion="giraffe"] { --companion-tone: #f8edd3; }
[data-companion="capybara"] { --companion-tone: #e5efe9; }
.companion-option .companion-portrait { background: radial-gradient(ellipse at 50% 78%, #e7ebd3, var(--companion-tone,#f5ebd7) 71%); }

.guided-page { width: min(100%, 680px); }
.guided-page .page-title { align-items: center; gap: 7px; }
.guided-intro {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(95px,34%); align-items: center; gap: 10px;
  padding: 8px clamp(13px,4vw,24px); min-height: 135px; overflow: hidden; border-radius: 18px; border: 1px solid #dfe7d7;
  background: linear-gradient(105deg, #fff9e9 10%,var(--companion-tone,#eff2de) 75%);
  color: #264b39;
}
.guided-intro img { display: block; justify-self: center; height: 122px; width: 100%; object-fit: contain; filter: drop-shadow(0 5px 5px #4c5e3730); }
.guided-intro p { margin-top: 6px; font-weight: 740; font-size: clamp(.97rem, 4vw, 1.3rem); }
.guided-topic { color: #496454; font-size: .79rem; font-weight: 750; }
.guided-steps {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px;
  list-style: none; margin: 12px 0; padding: 4px; border: 1px solid #e0e9de; border-radius: 12px;
  background: #edf2ea; color: #486257; font-size: .82rem; font-weight: 690;
}
.guided-steps li { display: flex; justify-content: center; align-items: center; gap: 5px; padding: 5px 2px; border-radius: 8px; }
.guided-steps li[aria-current="step"] { color: white; background: #2b5b49; }
.guided-steps .finished { color: #29563f; background: #ddebdc; }
.guided-steps li span { font-size: .78em; border-radius: 50%; padding: 1px 5px; background: #456c5425; }
.guided-steps li[aria-current="step"] span { background: #ffffff30; }
.guided-panel { padding: clamp(15px,4vw,23px); }
.guided-panel h2 { margin-bottom: 9px; }
.guided-word { font-size: clamp(1.52rem,7vw,2.15rem); font-weight: 850; color: #19394e; line-height: 1.32; margin: 9px 0 14px; }
.guided-choices { display: grid; gap: 8px; }
.guided-panel .guided-choice { text-align: left; background: #f8faf5; border-color: #d9e6dc; }
.guided-choice:hover, .guided-tokens button:hover { border-color: #5c886c; }
.guided-tokens, .guided-audio-row, .guided-replies { display: flex; flex-wrap: wrap; gap: 6px; }
.guided-tokens { margin: 13px 0 3px; }
.guided-tokens button { font-size: 1.16rem; overflow-wrap: anywhere; }
.guided-explanation { margin: 10px 0 12px; padding: 11px 12px; border-left: 3px solid #78a488; border-radius: 7px; background: #f0f5eb; line-height: 1.6; }
.guided-audio-row { margin: 8px 0 13px; }
.guided-audio-row .secondary, .guided-replies .secondary, .guided-record .secondary { min-height: 42px; padding: 5px 9px; font-size: .85rem; }
.guided-chunks { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.guided-chunks span { border-radius: 9px; padding: 5px 8px; background: #e8f0f7; color: #244661; font-weight: 790; }
.guided-chunks span + span { background: #e7efe3; color: #27513f; }
.guided-translation { font-size: .87rem; color: var(--muted); }
.guided-dialogue { margin: 15px 0 12px; padding: 12px; border: 1px solid #e5eada; border-radius: 11px; background: #f9faef; }
.guided-dialogue h3 { font-size: 1rem; }
.guided-dialogue .helper-note { margin: 5px 0 9px; }
.guided-replies .guided-selected { background: #deeee4; border-color: #7da78f; }
.guided-reaction { border-radius: 10px; background: #eaf2e8; color: #244b39; padding: 8px 10px; margin-top: 10px; }
.guided-reaction strong { font-size: .77rem; }
.guided-reaction p { margin: 3px 0; font-weight: 710; }
.guided-record { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.guided-record small { width: 100%; color: #566a5c; }
.guided-record audio { width: min(100%, 305px); height: 42px; }
.guided-record :is(button, audio) { max-width: 100%; }
.guided-feedback:empty { margin: 0; }
.guided-feedback { margin-top: 10px; font-size: .86rem; color: #405e50; }
.guided-reward {
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center; padding: 10px; margin: 9px 0 14px;
  border-radius: 11px; background: #f8eed7; font-weight: 820; color: #744a24;
}
.guided-reward span { margin-left: auto; color: #594d31; font-size: .87rem; }
.guided-summary { display: grid; gap: 3px; margin: 10px 0; }
.guided-summary div { display: grid; grid-template-columns: 6.2em minmax(0,1fr); gap: 7px; align-items: center; background: #f1f6ed; border-radius: 7px; padding: 7px 9px; }
.guided-summary dt { font-size: .82rem; color: #4c695a; }
.guided-summary dd { margin: 0; font-weight: 690; color: #254e3d; }

@media (max-width: 700px) {
  .guided-banner { gap: 8px; padding: 8px 9px; margin-top: 10px; }
  .guided-mark { width: 33px; height: 37px; border-radius: 8px; }
  .guided-banner-copy strong { font-size: .91rem; }
  .guided-banner-copy small { font-size: .68rem; }
  .guided-banner-go { font-size: .72rem; }
  .guided-page .page-title h1 { font-size: clamp(1.24rem,5.5vw,1.7rem); }
  .guided-intro { min-height: 111px; }
  .guided-intro img { height: 98px; }
  .guided-steps { font-size: .75rem; }
}
