.guide-layout {
  display: grid;
  grid-template-columns: minmax(255px, 320px) minmax(0, 1fr);
  min-height: 700px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(25, 15, 64, .05);
}

.guide-side {
  padding: 26px;
  background: linear-gradient(180deg, #fbfaff, #f5f2fc);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-side h3 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.guide-side > p:not(.section-kicker):not(.fine) { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.guide-side .field { margin-top: 4px; }
.guide-side select { width: 100%; padding: 11px; border: 1px solid #d9d4e5; border-radius: 10px; background: #fff; }
.guide-side > .ghost { width: 100%; }
.guide-cost { margin-top: auto; padding: 15px; border-radius: 13px; background: #fff; border: 1px solid var(--line); }
.guide-cost strong { font-size: 13px; }
.guide-cost p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.guide-main { display: flex; flex-direction: column; min-width: 0; background: linear-gradient(180deg, #fff, #fdfcff); }
.guide-intro { padding: 26px 30px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.guide-intro h2 { margin: 5px 0 8px; font-size: 27px; letter-spacing: -.035em; }
.guide-intro p:not(.section-kicker) { margin: 0; color: var(--muted); line-height: 1.55; }
.guide-messages { padding: 28px; display: flex; flex-direction: column; gap: 18px; min-height: 350px; max-height: 590px; overflow: auto; }
.guide-welcome { text-align: center; margin: auto; max-width: 560px; color: var(--muted); }
.guide-welcome h3 { color: var(--ink); font-size: 22px; margin: 12px 0 8px; }
.guide-welcome p { line-height: 1.6; }
.guide-symbol { width: 54px; height: 54px; margin: auto; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(135deg, var(--purple), var(--violet)); color: #fff; font-size: 24px; box-shadow: 0 12px 28px rgba(95, 40, 168, .22); }

.prompt-examples { padding: 0 28px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prompt-examples > span { color: var(--muted); font-size: 12px; }
.prompt-examples button { font-size: 11px; padding: 8px 10px; }
.guide-composer { margin-top: auto; padding: 18px 28px 26px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; border-top: 1px solid var(--line); background: #fff; }
.guide-composer textarea { min-height: 82px; max-height: 180px; resize: vertical; border: 1px solid #d9d4e5; border-radius: 14px; padding: 14px; outline: 0; }
.guide-composer textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 79, 233, .13); }
.guide-composer .primary { align-self: end; }

.plan-card { max-width: 92%; padding: 20px; border: 1px solid #dcd5f2; border-radius: 18px; background: #fff; box-shadow: 0 8px 25px rgba(25, 15, 64, .06); }
.plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.plan-head h3 { margin: 5px 0 0; }
.plan-reply { line-height: 1.65; margin: 16px 0; color: #3f3852; }
.plan-questions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.plan-questions button { text-align: left; }
.plan-steps { display: grid; gap: 10px; margin-top: 16px; }
.plan-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: #f8f6fd; border: 1px solid #ebe6f7; border-radius: 13px; padding: 13px; }
.step-number { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 800; }
.plan-step p { margin: 4px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.plan-step small { font-size: 10px; }
.plan-step button { white-space: nowrap; }
.guide-tool-config { grid-column: 2 / -1; padding: 15px; border-radius: 12px; background: #fff; border: 1px solid #e4def3; }
.guide-tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 12px; }
.guide-tool-config > .primary { width: 100%; margin-top: 10px; }
.guide-tool-config .fine { margin: 8px 0 0; }
.guide-messages > .result { max-width: 100%; }
.data-guidance { margin-top: 15px; padding: 14px; background: #f0fbf7; border-left: 3px solid var(--ok); border-radius: 9px; }
.data-guidance strong { font-size: 12px; }
.data-guidance ul { margin: 8px 0 0; padding-left: 18px; color: #4e625b; font-size: 12px; line-height: 1.55; }

@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .guide-cost { margin-top: 8px; }
}

@media (max-width: 720px) {
  .guide-composer { grid-template-columns: 1fr; padding: 16px 20px 20px; }
  .guide-composer button { width: 100%; }
  .guide-intro { padding: 22px; flex-direction: column; }
  .guide-messages { padding: 20px; }
  .prompt-examples { padding: 0 20px 14px; display: grid; }
  .plan-card { max-width: 100%; }
  .plan-head { flex-direction: column; }
  .plan-head .pill { max-width: 100%; overflow-wrap: anywhere; }
  .plan-step { grid-template-columns: 34px 1fr; }
  .plan-step button { grid-column: 1 / -1; width: 100%; white-space: normal; }
  .guide-tool-config { grid-column: 1 / -1; }
  .guide-tool-fields { grid-template-columns: 1fr; }
}
