.csm-assistant {
  max-width: 820px;
  margin: 2rem auto;
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .05);
}
.csm-assistant__header h2 { margin: 0 0 .35rem; }
.csm-assistant__header p { margin: 0 0 1rem; }
.csm-assistant__row { display: flex; gap: .65rem; }
.csm-assistant__input {
  flex: 1;
  min-width: 0;
  padding: .8rem .95rem;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 10px;
  font: inherit;
}
.csm-assistant__button {
  padding: .8rem 1.1rem;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  background: #1e5f74;
  color: #fff;
}
.csm-assistant__button:disabled { opacity: .6; cursor: wait; }
.csm-assistant__scope { margin: .7rem 0 0; font-size: .9rem; opacity: .78; }
.csm-assistant__status { margin-top: 1rem; font-weight: 700; }
.csm-assistant__list { margin: .8rem 0 0; padding-left: 1.3rem; }
.csm-assistant__item { margin-bottom: 1rem; }
.csm-assistant__item p { margin: .3rem 0 0; }
.csm-assistant__link { font-weight: 700; }
.csm-assistant__notice {
  padding: .8rem 1rem;
  border-left: 4px solid currentColor;
  background: rgba(0,0,0,.04);
}
.csm-assistant__empty { opacity: .85; }
@media (max-width: 640px) {
  .csm-assistant__row { flex-direction: column; }
  .csm-assistant__button { width: 100%; }
}
.csm-assistant__label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; font-weight: 600; }
.csm-assistant :focus-visible { outline: 3px solid #1e5f74; outline-offset: 3px; }
.csm-assistant__status:empty { display: none; }
@media (max-width: 640px) { .csm-assistant { margin: 1rem 0; padding: 1rem; } }
.csm-assistant__suggestions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.csm-assistant__suggestions button, .csm-assistant__toggle { padding: .55rem .75rem; border: 1px solid #1e5f74; border-radius: .6rem; background: #fff; color: #154757; font: inherit; cursor: pointer; }
.csm-assistant__suggestions button:hover, .csm-assistant__toggle:hover { background: #e9f3f5; }
.csm-assistant--floating { position: fixed; z-index: 9999; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); margin: 0; overflow: auto; box-sizing: border-box; }
.csm-assistant--floating .csm-assistant__toggle { width: 100%; font-weight: 700; }
.csm-assistant--floating .csm-assistant__header h2 { font-size: 1.4rem; line-height: 1.25; margin: .15rem 0 .4rem; }
.csm-assistant--floating .csm-assistant__header p { font-size: .95rem; line-height: 1.45; }
.csm-assistant--floating:not(.csm-assistant--open) { width: auto; max-width: calc(100vw - 2rem); padding: .25rem; border: 0; border-radius: 1rem; background: #1e5f74; }
.csm-assistant--floating:not(.csm-assistant--open) .csm-assistant__toggle { border: 0; background: #1e5f74; color: #fff; padding: .65rem .9rem; }
.csm-assistant--floating:not(.csm-assistant--open) .csm-assistant__toggle:hover { background: #154757; color: #fff; }
.csm-assistant__panel[hidden] { display: none; }
@media (max-width: 640px) { .csm-assistant--floating { right: max(.5rem, env(safe-area-inset-right)); bottom: max(.5rem, env(safe-area-inset-bottom)); width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); margin: 0; } .csm-assistant--floating:not(.csm-assistant--open) { width: auto; max-width: calc(100vw - 1rem); } }
.csm-assistant__mini-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; margin: 1rem 0; }
.csm-assistant__mini-form .csm-assistant__label { min-width: 11rem; }
.csm-assistant__mini-form input { padding: .65rem; border: 1px solid #66757f; border-radius: .5rem; font: inherit; }
.csm-assistant__calculation { margin: .75rem 0; }
.csm-assistant__calculation ul { margin: .5rem 0; }
.csm-assistant__results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: min(65vh, 660px);
  overflow-y: auto;
  padding: .75rem .25rem;
  scroll-behavior: smooth;
}
.csm-assistant__turn {
  box-sizing: border-box;
  max-width: 95%;
  padding: .8rem 1rem;
  border-radius: 1rem;
  overflow-wrap: anywhere;
}
.csm-assistant__turn p:first-child { margin-top: 0; }
.csm-assistant__turn p:last-child { margin-bottom: 0; }
.csm-assistant__turn--user { align-self: flex-end; background: #1e5f74; color: #fff; }
.csm-assistant__turn--assistant { align-self: flex-start; background: #f1f6f7; color: #172f38; }
.csm-assistant__turn-status { font-weight: 700; }
.csm-assistant__turn-status:empty { display: none; }
.csm-assistant__turn--assistant a { color: #12465a; text-decoration: underline; }
.csm-assistant__reset { margin-top: .75rem; padding: .5rem .75rem; border: 1px solid #1e5f74; border-radius: .6rem; background: #fff; color: #154757; font: inherit; cursor: pointer; }
.csm-assistant__reset:hover { background: #e9f3f5; }
.csm-assistant__reset:disabled { cursor: wait; opacity: .6; }
@media (max-width: 640px) { .csm-assistant__turn { max-width: 100%; } }
