body#translation-shared #st-new-translation-row {
  display: flex; flex: 0 0 auto; justify-content: flex-end;
  padding: 16px 24px 20px; background: transparent;
}
body#translation-shared #st-new-translation-row[hidden] { display: none !important; }
body#translation-shared #st-new-translation {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; max-width: 100%; padding: 12px 20px;
  border: 1px solid var(--ss-border, #d5ddd0); border-radius: 24px;
  background: var(--ss-selected, #e4eee8); color: var(--ss-on-selected, #3b614c);
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.35;
  cursor: pointer; box-shadow: 0 2px 6px #203d2514;
}
body#translation-shared #st-new-translation svg { width: 20px; height: 20px; flex: none; }
body#translation-shared #st-new-translation:hover { background: var(--ss-hover, #dce7df); }
body#translation-shared #st-new-translation:focus-visible { outline: 2px solid var(--ss-focus, #225a78); outline-offset: 3px; }
/* The native tablet layout stacks panels; keep long results scrollable and restart reachable. */
@media (min-width: 768px) and (max-width: 1023px) {
  html.st-can-start-new body#translation-shared#translation-shared .st-panels {
    overflow: auto !important; padding-bottom: 80px !important;
  }
  body#translation-shared #st-new-translation-row {
    position: fixed; inset-inline-end: 44px; bottom: 32px; z-index: 3; padding: 0;
  }
}
@media (max-width: 767px) {
  html[data-st-mobile-design] body#translation-shared #st-new-translation-row {
    background: var(--gm-paper, var(--ss-surface)); border-radius: 0 0 28px 28px;
    padding: 12px 24px 20px;
  }
  html.st-can-start-new[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared .st-panels {
    border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important;
  }
}

/* One phone action slot. Move the native Translate control, never clone its handler. */
body#translation-shared #st-new-translation { transition:background-color .18s!important; transition-behavior:normal!important; }
body#translation-shared #st-new-translation[hidden] { display:none!important; }
@media (max-width:767px) {
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared #st-new-translation-row {
    flex:none!important; padding:12px max(24px,env(safe-area-inset-right)) 16px max(24px,env(safe-area-inset-left));
    background:var(--gm-paper,var(--ss-surface)); border-radius:0 0 28px 28px;
  }
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared #st-new-translation-row #translateBtn {
    display:none!important; position:static!important; flex:none!important; margin:0!important;
    transition:background-color .18s!important; transition-behavior:normal!important;
  }
  html[data-st-phone-action="draft"] body#translation-shared#translation-shared#translation-shared#translation-shared #st-new-translation-row #translateBtn { display:flex!important; }
  html.st-phone-action-visible[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared .st-panels {
    border-bottom-left-radius:0!important; border-bottom-right-radius:0!important;
  }
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared .gm-source-actions { margin-block:24px!important; }
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared .st-target-panel { padding-block:24px 16px!important; margin-bottom:0!important; }
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared :is(.st-source-header,.st-target-header) { margin-block:8px 24px!important; }
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared .st-target-wrap>.st-floating-actions { margin-block:24px 8px!important; }
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared :is(.gm-source-language,.tm-target-heading) { font-size:14px!important; }
  html[data-gm-keyboard][data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared .st-language-bar { min-height:60px!important; padding-block:6px!important; }
  html[data-gm-keyboard][data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared .st-language-bar :is(#sourceLangBtn,#targetLangBtn) { min-height:44px!important; }
}

/* The result header owns Clear; source text no longer needs its draft inset. */
@media(max-width:767px){html.gm-has-result[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared #sourceEditor .ql-editor{padding-inline-end:0!important}}

/* Match the existing filled mobile focus treatment without outline rings. */
@media(max-width:767px){
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared :is(.gm-source-actions button,#gm-new,#swapLangsBtn,#gm-language-sheet button,#gm-language-sheet .st-lang-option):focus-visible{
    outline:none!important;box-shadow:none!important;
  }
  html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared :is(.gm-source-actions button,#gm-new,#swapLangsBtn,#gm-language-sheet button,#gm-language-sheet .st-lang-option):focus-visible:not([aria-pressed="true"]):not(.st-lang-option,.gm-language-favorite){
    background:var(--ss-hover)!important;
  }
}

/* Language rows own their full-width fill, including keyboard focus. */
@media(max-width:767px){
html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared #gm-language-sheet .gm-language-row :is(.st-lang-option,.gm-language-favorite){background:transparent!important}
html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared #gm-language-sheet .gm-language-row:has(:focus-visible,.st-lang-keyboard-active){background:var(--ss-hover)!important}
html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared #gm-language-sheet #targetLangDropdown .st-lang-list>.st-lang-extended+.gm-picker-group{border-top:0!important}
html[data-st-mobile-design] body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared #gm-language-sheet .st-lang-search-wrap::after{content:none!important}
}

/* Mobile translation owns focus decoration for controls and portal/dialog content.
   Keep keyboard focus and native selection; remove both outlines and shadow rings. */
@media(max-width:767px){
body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared,body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared *,body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared *::before,body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared *::after{outline:0!important;outline-offset:0!important}
body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared :focus:not(dialog):not([role="dialog"]),body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared :focus::before,body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared :focus::after,body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared .st-chat-input-wrapper:focus-within{box-shadow:none!important}
body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared :is(button,a,summary,input,select,textarea):focus-visible{text-decoration-line:none!important}
body#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared#translation-shared .ss-reader-menu summary:focus-visible{background:var(--ss-hover)!important}
}
