#quickTranslation {
  --qt-green: #284d3e;
  --qt-border: #b8c7bb;
  --qt-edge: clamp(.75rem, 2vw, 1.75rem);
}
#quickTranslation button { cursor: pointer; font: 600 .94rem/1.3 var(--sans); }
#quickTranslation button:focus-visible, #qt-input:focus-visible { outline: 3px solid #ac562f; outline-offset: 3px; }
#quickTranslation .qt-launch {
  position: fixed; z-index: 12; right: max(var(--qt-edge), env(safe-area-inset-right));
  bottom: max(var(--qt-edge), env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
  padding: .68rem 1.1rem; border-radius: 2rem; border: 1px solid #f9fbf5;
  background: var(--qt-green); color: white; box-shadow: 0 3px 14px #213c302c;
}
footer .foot { padding-bottom: max(3.75rem, env(safe-area-inset-bottom)); }
#qt-panel {
  position: fixed; inset: auto max(var(--qt-edge), env(safe-area-inset-right)) max(var(--qt-edge), env(safe-area-inset-bottom)) auto; margin: 0;
  width: min(26rem, calc(100% - 2 * var(--qt-edge))); max-width: 100%; max-height: calc(100dvh - 2 * var(--qt-edge));
  overflow: auto; overscroll-behavior: contain; padding: 1.25rem;
  border: 1px solid var(--qt-border); border-radius: 1rem;
  color: var(--ink); background: #fffef9; box-shadow: 0 12px 45px #233d3033;
}
#qt-panel::backdrop { background: rgb(24 43 34 / 17%); }
.qt-heading, .qt-controls, .qt-languages { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.qt-heading h2 { margin: 0; font: 1.85rem/1.15 var(--serif); }
#quickTranslation .qt-close, #quickTranslation .qt-swap {
  display: grid; place-content: center; min-width: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: .5rem; color: var(--qt-green); background: transparent; font-size: 1.35rem;
}
#quickTranslation .qt-close { font-size: 1.65rem; }
.qt-close:hover, .qt-swap:hover { background: #e3eade !important; }
.qt-languages { justify-content: center; margin: .85rem 0; background: #eef2e9; border-radius: .6rem; font-weight: 600; }
.qt-languages span { flex: 1; text-align: center; }
#qt-input { width: 100%; padding: .75rem; resize: vertical; min-height: 5rem; max-height: 30dvh; display: block; font: inherit; color: inherit; background: white; border: 1px solid var(--qt-border); border-radius: .55rem; }
.qt-controls { margin-top: .85rem; align-items: center; }
.qt-controls p { margin: 0; font-size: .83rem; line-height: 1.4; color: var(--muted); }
.qt-submit { background: var(--qt-green); color: white; border: 0; border-radius: .55rem; min-height: 44px; padding: .6rem 1.1rem; }
.qt-submit:disabled { opacity: .55; cursor: default !important; }
.qt-status { margin: .75rem 0 0; font-size: .9rem; }
.qt-status:empty { margin: 0; }
.qt-result { border-top: 1px solid var(--qt-border); margin-top: .75rem; padding-top: .75rem; }
.qt-result h3 { margin: 0 0 .2rem; color: var(--qt-green); font: 600 .9rem/1.4 var(--sans); }
.qt-result p { margin: 0; font-size: 1.12rem; white-space: pre-wrap; overflow-wrap: anywhere; }
@media print { #quickTranslation { display: none; } }
