.support-widget {
  position: fixed; right: clamp(1rem, 2vw, 2rem); bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40; font-family: var(--f-jp); letter-spacing: .02em;
}
.support-widget button:focus-visible, .lesson-help:focus-visible {
  outline: 2px solid var(--c-ink); outline-offset: 3px;
}
.support-launcher {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 46px;
  padding: .65rem 1rem; border-radius: 100px; background: var(--c-ink); color: #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,.13); font-size: .76rem; font-weight: 500;
  line-height: 1; white-space: nowrap;
}
.support-launcher:hover { background: #303030; }
.support-launcher__icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-widget.is-open .support-launcher { display: none; }
.support-panel {
  position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column;
  width: min(368px, calc(100vw - 2rem)); height: min(390px, calc(100dvh - 2rem));
  overflow: hidden; border: 1px solid var(--c-line); border-radius: 12px;
  background: #fff; box-shadow: 0 14px 48px rgba(0,0,0,.14);
}
.support-panel[hidden] { display: none; }
.support-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  min-height: 59px; padding: .85rem 1rem; border-bottom: 1px solid var(--c-line);
}
.support-panel__title { color: var(--c-ink); font-size: .88rem; font-weight: 500; line-height: 1.3; }
.support-panel__close { flex: none; display: grid; place-items: center; width: 30px; height: 30px; color: var(--c-ink); font-size: 1.25rem; line-height: 1; }
.support-panel__body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.35rem 1.2rem; }
.support-welcome h3 { color: var(--c-ink); font-size: 1.06rem; font-weight: 500; line-height: 1.5; }
.support-welcome p { margin-top: .3rem; color: var(--c-mute); font-size: .72rem; line-height: 1.6; }
.support-suggestions { display: grid; gap: .15rem; margin-top: 1.4rem; }
.support-suggestions button {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  width: 100%; padding: .55rem 0; border-bottom: 1px solid var(--c-line);
  color: var(--c-ink-2); font-size: .72rem; line-height: 1.5; text-align: left;
}
.support-suggestions button::after { content: '↗'; flex: none; color: var(--c-mute); font-family: var(--f-sans); font-size: .85rem; }
.support-suggestions button:hover { color: var(--c-ink); }
.support-compose { padding: .85rem 1rem .75rem; border-top: 1px solid var(--c-line); }
.support-compose__field { display: flex; align-items: flex-end; gap: .35rem; padding: .45rem .55rem; border: 1px solid var(--c-line); border-radius: 7px; }
.support-compose__field:focus-within { border-color: var(--c-ink); }
.support-compose textarea {
  flex: 1; min-width: 0; height: 88px; padding: .15rem; border: 0; outline: 0; resize: none;
  color: var(--c-ink); background: transparent; font: inherit; font-size: .74rem; line-height: 1.5;
}
.support-compose textarea::placeholder { color: var(--c-mute); }
.support-compose__send {
  flex: none; display: grid; place-items: center; width: 29px; height: 29px;
  border-radius: 5px; background: var(--c-ink); color: #fff; font-size: .95rem;
  cursor: not-allowed;
}
.support-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lesson-help {
  display: inline-flex; align-items: center; gap: .45rem; margin-top: .8rem; padding: 0;
  color: var(--c-ink-2); font-size: .74rem; line-height: 1.6;
}
.lesson-help:hover { color: var(--c-ink); }
.lesson-help span:last-child { font-size: .88rem; }
@media (min-width: 981px) {
  body[data-page="lesson"] .lp.is-open ~ .support-widget { right: calc(clamp(260px, 26vw, 380px) + 1.5rem); }
}
@media (max-width: 480px) {
  .support-widget { right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); }
  .support-panel { height: min(390px, calc(100dvh - 2rem)); }
}
